﻿using System;
using System.Linq;
using System.Text.RegularExpressions;  

namespace CsTxtConv
{
    public class CsTxtConv
    {
        public string ToClassName(string name)
        {
            return string.Concat(name.Split('-').Select(x => char.ToUpper(x[0]) + x.Substring(1)));
        }

        public string ToCliName(string name)
        {
            return string.Join("-", Regex.Split(name, @"(?<!^)(?=[A-Z0-9])")).ToLower();
        }

        public string ToCompactName(string name)
        {
            return new Regex("[^a-zA-Z0-9]").Replace(name, "").ToLower();
        }
    }
}
